/*
 * Copyright (C) 2017 Qi Cai Technology Co., Ltd. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at 
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */
package com.example.lkslib.dbmanager;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * TODO this class desription here
 * <p>
 * Created by ww on 2017/8/9.
 */
public class DBInitUtil {
    static DBInitUtil instance;
    private static List<Class> classList;
    private static List<UpDateHelperBean> beanList;

    public static List<UpDateHelperBean> getBeanList() {
        return beanList;
    }

    public static List<Class> getClassList() {
        return classList;
    }
    public static void addClass(Class aClass){
        if(null==classList){
            classList=new ArrayList<>();
        }
        classList.add(aClass);
    }
    public static void addUpDateHelperBean(UpDateHelperBean bean){
        if(null==beanList){
            beanList=new ArrayList<>();
        }
        beanList.add(bean);
    }
    public static synchronized DBInitUtil getInstance() {
        if (instance == null) {
            synchronized (DBInitUtil.class) {
                if (instance == null)
                    instance = new DBInitUtil();
            }
        }
        return instance;
    }
}
